const express=require('express')
const news=require('../middleware/News/index')
const NewsApp=express()
NewsApp.get('/getnewstype',[news.getNewsType],(req,res,next)=>{
    res.send({
        code:200,
        data:req.newsType
    })
})
NewsApp.get('/getnews',[news.getNews],(req,res,next)=>{
    res.send({
        code:200,
        data:req.news
    })
})
NewsApp.get('/getnewsdetail',[news.getNewsDetail],(req,res,next)=>{
    res.send({
        code:200,
        data:req.newsDetail
    })
})
module.exports=NewsApp